/**
 * Created by dev-001 on 2017/3/15.
 */
import mongoose from 'mongoose';
const Schema = mongoose.Schema;
const ObjectId = Schema.Types.ObjectId;

const ExamTypeSchema = new Schema({
    name: String,
    createdAt: Date,
    updatedAt: Date
});

ExamTypeSchema.pre('save', function (next) {
    this.createdAt = new Date();
    next();
});

export default mongoose.model('ExamType', ExamTypeSchema);